#sage
from Crypto.Util.number import *
q=61843562051620700386348551175371930486064978441159200765618339743764001033297
c=105002138722466946495936638656038214000043475751639025085255113965088749272461906892586616250264922348192496597986452786281151156436229574065193965422841
p=14213355454944773291
gift=9751789326354522940
e1 = 65537
n=p**4*q
d1= inverse_mod(e1,p-1)
m1= pow(gift,d1,p)
e = m1-114514
result = Zmod(n)(c).nth_root(e,all=True)
for res in result:
    flag = long_to_bytes(int(res))
    if b'hgame{' in flag:
       print(flag)
       break

#hgame{Ad1eman_Mand3r_Mi11er_M3th0d}
